ngl: Improve the glyph front cache
authorMatthias Clasen <mclasen@redhat.com>
Fri, 19 Mar 2021 18:30:19 +0000 (14:30 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 19 Mar 2021 18:32:03 +0000 (14:32 -0400)
commitb253aca883e886a5b5b8eaa770594ad1b77e9afe
tree5f1e849a16c7000b4d6cbbf6de1e451cd786d131
parent5ac7f7c2f608a195ba2ed43f164d4f0eecb29a60
ngl: Improve the glyph front cache

The effectiveness of the front cache is limited by
subpixel positioning making it very likely that we
will meet the same glyph in  different x phases inside
a single line of text.

Factoring the xphase into the front cache key makes things
better. For the string eeeeeeeeeeeeeeeeeee

before: 0% front cache hits
after: >90% front cache hits
gsk/ngl/gsknglglyphlibraryprivate.h